<template>
	<view class="mian">
		<view class="mains">
			<view class="form">
				<view class="titles">
					<view class="lines"></view>
					<text class="name">基本信息</text>
					<text class="msg">(商户费率仅支持小数后两位)</text>
				</view>
				<view class="item">
					<view class="title">
						活动名称
					</view>
					<view class="value" @click="show = true">
						<view>请选择</view>
						<u-icon name="arrow-right"></u-icon>
					</view>
				</view>
				<view class="item">
					<view class="title">
						活动名称
					</view>
					<view class="values">
						<input type="text" placeholder="请填写模板名称">
					</view>
				</view>
				<view class="item">
					<view class="title">
						扫码费率
					</view>
					<view class="value">
						<input type="text">
						<text>%</text>
					</view>
				</view>
				<view class="item">
					<view class="title">
						云闪付费率
					</view>
					<view class="value">
						<input type="text">
						<text>%</text>
					</view>
				</view>
				<view class="item">
					<view class="title">
						贷记卡费率
					</view>
					<view class="value">
						<input type="text">
						<text>%</text>
					</view>
				</view>
				<view class="item">
					<view class="title">
						借记卡费率
					</view>
					<view class="value">
						<input type="text">
						<text>%</text>
					</view>
				</view>
				<view class="item">
					<view class="title">
						借记卡封顶
					</view>
					<view class="value">
						<input type="text">
						<text>元</text>
					</view>
				</view>
				<view class="item">
					<view class="title">
						D0额外定额手续费
					</view>
					<view class="value">
						<input type="text">
						<text>元</text>
					</view>
				</view>
			</view>
			<u-picker :show="show" :columns="activity" keyName="label" @confirm="selects" @cancel="show = false"></u-picker>
			<view class="saveBtn" @click="saveData">
				创建模板
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				show: false,
				activity: [[{
					id: 1,
					label: '活动1'
				},{
					id: 2,
					label: '活动2'
				}]]
			}
		},
		onLoad() {
			
		},
		methods: {
			selects(e) {
				console.log(e)
				
				this.show = false
			},
			saveData() {
				
			}
		}
	}
</script>

<style lang="scss" scoped>
	page{
		background-color: #F2F6FC;
	}
	
	.mains {
		padding: 30rpx;
		.form {
			background-color: #ffffff;
			border-radius: 20rpx;
			padding: 30rpx 30rpx 0 30rpx;
			
			.titles {
				display: flex;
				align-items: center;
				padding-bottom: 30rpx;
				border-bottom: 1px solid #EBEEF5;
				.lines {
					display: block;
					width: 6px;
					border-radius: 6rpx;
					height: 30rpx;
					background-color: #409EFF;
				}
				.name {
					font-size: 28rpx;
					font-weight: bold;
					padding-left: 20rpx;
				}
				.msg {
					padding-left: 20rpx;
					font-size: 24rpx;
					color: #C0C4CC;
				}
			}
			
			.item {
				display: flex;
				justify-content: space-between;
				border-bottom: 1px solid #EBEEF5;
				padding: 20rpx 0;
				align-items: center;
				
				.title {
					font-size: 30rpx;
					width: 60%;
				}
				
				.values {
					display: flex;
					justify-content: flex-end;
					
					view {
						font-size: 26rpx;
						padding-right: 10rpx;
						color: #909399;
					}
					
					input {
						text-align: right;
						padding: 0 10rpx !important;
					}
				}
				
				.value {
					display: flex;
					justify-content: flex-end;
					
					view {
						font-size: 26rpx;
						padding-right: 10rpx;
						color: #909399;
					}
					
					input {
						width: 40%;
						padding: 0 50rpx 0 10rpx;
						border-bottom: 1px solid #C0C4CC;
					}
					
					text {
						position: absolute;
						padding-right: 10rpx;
					}
				}
			}
		}
	
		.saveBtn {
			margin-top: 50rpx;
			width: 100%;
			padding: 30rpx 0;
			text-align: center;
			color: #ffffff;
			background-color: #409EFF;
			border-radius: 20rpx;
		}
	}
</style>
